﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="WebApp.ChangePassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><%= Resources.Strings.ChangePassword%></title>
    <link rel="stylesheet" href='<%= this.ResolveUrl("~/css/login.css") %>' type="text/css" />
    <script language="javascript" type="text/javascript" src='<%= this.ResolveUrl("~/js/common.js") %>'></script>
    <script language="javascript" type="text/javascript" src='<%= this.ResolveUrl("~/js/jquery-1.5.1.min.js") %>'></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%= btnChange.ClientID %>").click(function () {
                try {
                    var txtNewPassword = $("#<%= txtNewPassword.ClientID %>");
                    var txtConfirmPassword = $("#<%= txtConfirmPassword.ClientID %>");

                    if (txtNewPassword.val() != txtConfirmPassword.val()) {
                        alert("<%= Resources.Strings.MissMatchPassword %>");
                        return false;
                    }

                    return true;
                } catch (e) {
                    alert(e);
                    return false;
                }
            });
        });
    </script>
</head>
<body>
    <div id="pageLogin">
    <form method="post" action="" id="loginForm" runat="server">
		<h1><%= Resources.Strings.RepairingManagementSystem%></h1>
		<fieldset style="width: 400px">
			<legend><%= Resources.Strings.ChangePassword%></legend>
			<table id="maintable" cellspacing="10px">
				<tr>
					<td width="40%"><label for="<%= txtUsername.ClientID%>"><%= Resources.Strings.Username %></label></td>
					<td><asp:textbox id="txtUsername" runat="server" cssclass="FieldInput"/></td>
				</tr>
				<tr>
					<td><label for="<%= txtOldPassword.ClientID%>"><%= Resources.Strings.OldPassword %></label></td>
					<td><asp:textbox id="txtOldPassword" runat="server" textmode="password" cssclass="FieldInput"></asp:textbox></td>                   
				</tr>
                <tr>
					<td><label for="<%= txtNewPassword.ClientID%>"><%= Resources.Strings.NewPassword %></label></td>
					<td><asp:textbox id="txtNewPassword" runat="server" textmode="password" cssclass="FieldInput"></asp:textbox></td>                   
				</tr>
                <tr>
					<td><label for="<%= txtConfirmPassword.ClientID%>"><%= Resources.Strings.ConfirmPassword %></label></td>
					<td><asp:textbox id="txtConfirmPassword" runat="server" textmode="password" cssclass="FieldInput"></asp:textbox></td>                   
				</tr>
				<tr>
					<td colspan="2" align="right">
						<asp:Button id="btnChange" runat="server" 
                            text="<%$ Resources:Strings,Change %>" onclick="btnChange_Click"/>
                        <asp:Button id="btnBack" runat="server" 
                            text="<%$ Resources:Strings,Back %>" onclick="btnBack_Click"/>
					</td>
				</tr>
		  </table>
	   </fieldset>
    </form>
	</div>
</body>
</html>
